<#include "/common/defaultEngine.html"/>
<@pageTheme mark="${config.optimize()?string('true', 'false')}">
<@header title="新增汇款信息" bodyClass="white-bg" libs=["prism","bootstrapSelect","ueditor"]/>
<div class="wrapper wrapper-content ibox-content">
    <@form.form id="form-remittance-add" class="form-horizontal">
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "流水号"/>：
    </label>
        <div class="col-sm-8"><input class="form-control" type="text" value="${bpmCrmRemittance.saleOrderNumber?default('')}" readonly="true">
        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "销售员"/>：
    </label>
        <div class="col-sm-8"><input class="form-control" type="text" value="${bpmCrmRemittance.saleUsername?default('')}" readonly="true">
        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "销售订单编号"/>：
    </label>
        <div class="col-sm-8"><input class="form-control" type="text" value="${bpmCrmRemittance.saleCode?default('')}" readonly="true">
        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "车辆识别号"/>：
    </label>
        <div class="col-sm-8"><input name="outCarVin" class="form-control" type="text" value="${bpmCrmRemittance.outCarVin?default('')}" readonly="true">
        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "车型"/>：
    </label>
        <div class="col-sm-8"><input name="outCarVehicle" class="form-control" type="text" value="${bpmCrmRemittance.outCarVehicle?default('')}" readonly="true">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "费用发生日期"/>：</label>
        <div class="col-sm-8">
            <div class="input-group date">
                <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                <input class="form-control" name="remittanceCostTime" data-type="date" data-format="yyyy-MM-dd" value="${(bpmCrmRemittance.remittanceCostTime?string('yyyy-MM-dd'))!}" type="text" readonly="true"/>
            </div>
        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "报销金额"/>：
    </label>

        <div class="col-sm-8"><input name="remittanceReimburseAmount" class="form-control" type="text" readonly="true" value="${bpmCrmRemittance.remittanceReimburseAmount?default('')}">
        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "凭证"/>：
    </label>
        <div class="col-sm-8">

            <div class="layui-upload">
                <div class="layui-upload-list layui-upList-minHeight uploadpadding">
                    <table class="layui-table">
                        <thead>
                        <tr>
                            <th>文件名</th>
                            <th>大小</th>
                            <th>状态</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody id="demojiazhaoList1">
                        <tr id="upjiazhaoload1"></tr>
                        <#list proof as item>
                        <tr id="upload${item_index}1">
                            <td> ${item.fileName?default("")}</td>
                            <td> ${item.fileSize?default("")}</td>
                            <td>已上传</td>
                            <td>
                                <a class="btn btn-danger btn-sm" href="#" download="${item.url}"><i class="fa fa-download"></i></a>
                            </td>
                        </tr>
                        </#list>
                        </tbody>
                    </table>
                </div>
            </div>

        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "备注"/>：
    </label>
        <div class="col-sm-8"><input name="remittanceRemark" class="form-control" type="text" readonly="true" value="${bpmCrmRemittance.remittanceRemark?default('')}">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "首选付款方式"/>：</label>
        <div class="col-sm-8">
            <@form.radio name="remittanceFirstPaymethod" dictType="sys_crm_paymethod" readOnly="true" value="${bpmCrmRemittance.remittanceFirstPaymethod?default('')}" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "备忘录"/>：</label>
        <div class="col-sm-8">
            <textarea name="remittanceMemo" class="form-control" readonly="true">${bpmCrmRemittance.remittanceMemo?default('')}</textarea>
        </div>
    </div>

    <div class="form-group checkClass"><label class="col-sm-3 control-label"><@ctx.i18n text = "收件人姓名"/>：
    </label>
        <div class="col-sm-8"><input name="remittanceRecipientName" class="form-control" type="text" readonly="true" value="${bpmCrmRemittance.remittanceRecipientName?default('')}">
        </div>
    </div>
    <div class="form-group checkClass"><label class="col-sm-3 control-label"><@ctx.i18n text = "收件人地址"/>：
    </label>
        <div class="col-sm-8"><input name="remittanceRecipientAddress" class="form-control" type="text" readonly="true" value="${bpmCrmRemittance.remittanceRecipientAddress?default('')}">
        </div>
    </div>
    <div class="form-group checkClass"><label class="col-sm-3 control-label"><@ctx.i18n text = "收件人手机"/>：
    </label>
        <div class="col-sm-8"><input name="remittanceRecipientPhone" class="form-control" type="text" readonly="true" value="${bpmCrmRemittance.remittanceRecipientPhone?default('')}">
        </div>
    </div>
    <div class="form-group wireClass"><label class="col-sm-3 control-label"><@ctx.i18n text = "金额"/>：
    </label>
        <div class="col-sm-8"><input name="remittanceAccount" class="form-control" type="text" readonly="true" value="${bpmCrmRemittance.remittanceAccount?default('')}">
        </div>
    </div>
    <div class="form-group wireClass"><label class="col-sm-3 control-label"><@ctx.i18n text = "汇款路径号码"/>：
    </label>
        <div class="col-sm-8"><input name="remittanceRouting" class="form-control" type="text" readonly="true" value="${bpmCrmRemittance.remittanceRouting?default('')}">
        </div>
    </div>
    <div class="form-group wireClass"><label class="col-sm-3 control-label"><@ctx.i18n text = "银行地址"/>：
    </label>
        <div class="col-sm-8"><input name="remittanceBankaddress" class="form-control" type="text" readonly="true" value="${bpmCrmRemittance.remittanceBankaddress?default('')}">
        </div>
    </div>
    <div class="form-group rmbClass">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "人民币汇款方式"/>：</label>
        <div class="col-sm-8">
            <@form.radio name="remittanceRmbPaymethod" dictType="sys_crm_isOrNo" readOnly="true"  value="${bpmCrmRemittance.remittanceRmbPaymethod?default('')}" />
        </div>
    </div>
    <div class="form-group rmbClassMoney"><label class="col-sm-3 control-label"><@ctx.i18n text = "银行名称"/>：
    </label>
        <div class="col-sm-8"><input name="remittanceRmbBankname" class="form-control" type="text" readonly="true" value="${bpmCrmRemittance.remittanceRmbBankname?default('')}">
        </div>
    </div>
    <div class="form-group rmbClassMoney"><label class="col-sm-3 control-label"><@ctx.i18n text = "银行账户"/>：
    </label>
        <div class="col-sm-8"><input name="remittanceRmbBankaccount" class="form-control" type="text" readonly="true" value="${bpmCrmRemittance.remittanceRmbBankaccount?default('')}">
        </div>
    </div>
    <div class="form-group rmbClassMoney">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "账户名"/>：</label>
        <div class="col-sm-8">
            <textarea name="remittanceRmbAccountname" class="form-control" readonly="true">${bpmCrmRemittance.remittanceRmbBankaccount?default('')}</textarea>
        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "审批金额"/>：
    </label>
        <div class="col-sm-8"><input name="approvalAmount" class="form-control" type="text" readonly="true" value="${bpmCrmRemittance.approvalAmount?default('')}">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "出纳审批"/>：</label>
        <div class="col-sm-8">
            <@form.radio name="approvalCashier" dictType="sys_bpm_crm_passorclose" readOnly="true" value="${bpmCrmRemittance.approvalCashier?default('')}" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "出纳备注"/>：</label>
        <div class="col-sm-8">
            <textarea name="approvalCashierRemark" class="form-control" readonly="true">${bpmCrmRemittance.approvalCashierRemar?default('')}</textarea>
        </div>
    </div>

    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "比例"/>：
    </label>
        <div class="col-sm-8"><input name="reimburseProportion" class="form-control" type="text" readonly="true" value="${bpmCrmRemittance.reimburseProportion?default('')}">
        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "金额"/>：
    </label>
        <div class="col-sm-8"><input name="reimburseAmount" class="form-control" type="text" readonly="true" value="${bpmCrmRemittance.reimburseAmount?default('')}">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "财务经理审批"/>：</label>
        <div class="col-sm-8">
            <@form.radio name="reimburseFinanceapproval" dictType="sys_bpm_crm_passorclose" readOnly="true" value="${bpmCrmRemittance.reimburseFinanceapproval?default('')}" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "财务经理备注"/>：</label>
        <div class="col-sm-8">
            <textarea name="reimburseFinanceremark" class="form-control" readonly="true">${bpmCrmRemittance.reimburseFinanceremark?default('')}</textarea>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "日期"/>：</label>
        <div class="col-sm-8">
            <div class="input-group date">
                <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                <input class="form-control time-input" name="payTime" data-type="date" data-format="yyyy-MM-dd" type="text" readonly="true" value="${(bpmCrmRemittance.payTime?string('yyyy-MM-dd'))!}"/>
            </div>
        </div>
    </div>
    <div class="form-group">        <label class="col-sm-3 control-label"><@ctx.i18n text = "汇款方式"/>：</label>
        <div class="col-sm-8">
            <@form.radio name="payMethod" dictType="sys_crm_remitmoney" value="${bpmCrmRemittance.payMethod?default('0')}" readOnly="true" />
        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "附件"/>：
    </label>
        <div class="col-sm-8">

            <div class="layui-upload">
                <div class="layui-upload-list layui-upList-minHeight uploadpadding">
                    <table class="layui-table">
                        <thead>
                        <tr>
                            <th>文件名</th>
                            <th>大小</th>
                            <th>状态</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody id="demojiazhaoList">
                        <tr id="upjiazhaoload"></tr>
                        <#list proofList as item>
                        <tr id="upload${item_index}">
                            <td> ${item.fileName?default("")}</td>
                            <td> ${item.fileSize?default("")}</td>
                            <td>已上传</td>
                            <td>
                                <a class="btn btn-danger btn-sm" href="#" download="${item.url}"><i class="fa fa-download"></i></a>
                            </td>
                        </tr>
                        </#list>
                        </tbody>
                    </table>
                </div>
            </div>

        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "接收人号码"/>：
    </label>
        <div class="col-sm-8"><input name="payReceiptNumber" class="form-control" type="text" readonly="true" value="${bpmCrmRemittance.payReceiptNumber?default('')}">
        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "备忘录"/>：
    </label>
        <div class="col-sm-8"><input name="payMemo" class="form-control" type="text" readonly="true" value="${bpmCrmRemittance.payMemo?default('')}">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "结果"/>：</label>
        <div class="col-sm-8">
            <@form.radio name="cashierResult" dictType="sys_bpm_crm_passorclose" readOnly="true" value="${bpmCrmRemittance.reimburseAmount?default('')}" />
        </div>
    </div>
    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "金额"/>：
    </label>
        <div class="col-sm-8"><input name="cashierAmount" class="form-control" type="text" readonly="true" value="${bpmCrmRemittance.cashierAmount?default('')}">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "备忘录"/>：</label>
        <div class="col-sm-8">
            <textarea name="cashierMemo" class="form-control" readonly="true">${bpmCrmRemittance.cashierMemo?default('')}</textarea>
        </div>
    </div>

    <div class="form-group"><label class="col-sm-3 control-label"><@ctx.i18n text = "付款总额"/>：
    </label>
        <div class="col-sm-8"><input name="cashierPaysumamount" class="form-control" type="text" readonly="true" value="${bpmCrmRemittance.cashierPaysumamount?default('')}">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "备忘录"/>：</label>
        <div class="col-sm-8">
            <textarea name="memo" class="form-control" readonly="true">${bpmCrmRemittance.memo?default('')}</textarea>
        </div>
    </div>

</@form.form>
</div>
<@footer>
<script type="text/javascript">
    var prefix = baseURL + "bpm/remittance"
    $("#form-remittance-add").validate({
        focusCleanup: true
    });

    function submitHandler() {
        opt.closeItem(this);
        return;
        if (opt.validate.form()) {
            opt.operate.save(prefix + "/edit", $('#form-remittance-add').serialize());
        }
    }

    /**
     * redio 单选回调
     * @param id
     * @param data
     * @param event
     */
    function redioCallback(id, data, event) {

        if (id == "remittanceFirstPaymethod") {
            if ($(data).is(':checked')) {
                var menuType = $(event.target).val();
                if (menuType == "0") {
                    $(".rmbClass").show();
                    $(".wireClass").hide();
                    $(".checkClass").hide();
                    var rmbStatus = $("[name='remittanceRmbPaymethod']")[0].checked;
                    if (rmbStatus) {
                        $(".rmbClassMoney").show();
                    } else {
                        $(".rmbClassMoney").hide();
                    }
                } else if (menuType == "1") {
                    $(".rmbClass").hide();
                    $(".wireClass").hide();
                    $(".checkClass").hide();
                    $(".rmbClassMoney").hide();
                } else if (menuType == "2") {
                    $(".rmbClass").hide();
                    $(".wireClass").hide();
                    $(".checkClass").show();
                    $(".rmbClassMoney").hide();
                } else if (menuType == "3") {
                    $(".rmbClass").hide();
                    $(".wireClass").show();
                    $(".checkClass").show();
                    $(".rmbClassMoney").hide();
                }
            }
        } else if (id == "remittanceRmbPaymethod") {
            if ($(data).is(':checked')) {
                var valueType = $(event.target).val();
                if (valueType == "1") {
                    $(".rmbClassMoney").show();
                } else {
                    $(".rmbClassMoney").hide();
                }
            }
        }
    }

</script>
</@footer>
</@pageTheme>